package com.yeci.controller;


import com.yeci.entity.MainMenu;
import com.yeci.common.AjaxResult;
import com.yeci.mapper.MainMenuMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 菜单导航
 * @author yeci
 * @since 2021-08-11
 */
@Slf4j
@RestController
@RequestMapping("/mainMenu")
public class MainMenuController {
  @Autowired
  private MainMenuMapper mapper;

  @RequestMapping("/menus")
  public AjaxResult getAllMenus(){
    List<MainMenu> mainMenus = mapper.getMainMenus();
    return AjaxResult.success(mainMenus);
  }
}

